{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.adv_index_manage}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
  <form method="get" action="" name="formSearch">
      <div class="ds-search-form">
          <dl>
              <dt>{$Think.lang.ap_name}</dt>
              <dd><input class="txt" type="text" name="search_name" id="search_name" value="{$Request.param.search_name}" /></dd>
          </dl>
          <div class="btn-group">
              <a href="javascript:document.formSearch.submit();" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
              {if $filtered}
              <a href="{:url('Appadv/index')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
              {/if}
          </div>    
      </div>    
  </form>



  <div class="explanation" id="explanation">
      <div class="title" id="checkZoom">
          <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
          <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
      </div>
      <ul>
          <li>{$Think.lang.adv_help2}</li>
      </ul>
  </div>


    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th><input type="checkbox" class="checkall"/></th>
                <th>{$Think.lang.ap_name}</th>
                <th class="align-center">{$Think.lang.ap_width}</th>
                <th class="align-center">{$Think.lang.ap_height}</th>
                <th class="align-center">{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
      <tbody>
        {notempty name="ap_list"}
        {foreach name="ap_list" item="v" key="k" }
        <tr class="hover" id="ds_row_{$v.ap_id}">
          <td class="w24"><input type="checkbox" class="checkitem" name="del_id[]" value="{$v.ap_id}" /></td>
          <td class="name"><span class="editable"  ds_type="inline_edit" ajax_branch='ap_branch' fieldname="ap_name" fieldid="{$v.ap_id}" required="1"  title="{$Think.lang.ds_editable}">{$v.ap_name}</span></td>
          <td class="align-center sort"><span class="editable"  ds_type="inline_edit" ajax_branch='ap_branch' fieldname="ap_width" fieldid="{$v.ap_id}" datatype="pint"  title="{$Think.lang.ds_editable}">{$v.ap_width}</span></td>
          <td class="align-center sort"><span class="editable"  ds_type="inline_edit" ajax_branch='ap_branch' fieldname="ap_height" fieldid="{$v.ap_id}" datatype="pint"  title="{$Think.lang.ds_editable}">{$v.ap_height}</span></td>
          <td class="align-center">
              <a href="{:url('Appadv/adv',['ap_id'=>$v.ap_id])}" class="dsui-btn-view"><i class="iconfont"></i>{$Think.lang.ds_manage}</a>
              <a href="javascript:dsLayerOpen('{:url('Appadv/ap_edit',['ap_id'=>$v.ap_id])}','{$Think.lang.ds_edit}-{$v.ap_name}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
             {if $v.ap_id >4} <a href="javascript:dsLayerConfirm('{:url('Appadv/ap_del',['ap_id'=>$v.ap_id])}','{$Think.lang.ds_ensure_install}',{$v.ap_id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>{/if}
          </td>
        </tr>
        {/foreach}
        {else /}
        <tr class="no_data">
          <td colspan="15">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
      </tbody>
    </table>
    {$showpage|raw}

</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>